﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

using System.Windows.Forms;
using ModularAndPlugin.Core.Composition;
using ModularAndPlugin.WinApp.Contracts;
using SailHero.Soft.FrameWork.Models;

namespace UI.WinForm.DayDatas
{
    public static class DayDatasCommandFacade
    {
        public static IModuleHandler ModuleHandler { get; set; }

        public static void MenuAddData(object sender, EventArgs e)
        {
            NewData();
        }

        public static void MenuDataList(object sender, EventArgs e)
        {
            ViewData();
        }
        [CommandAttibute("NewData")]
        public static bool NewData()
        {
            frmAddData f = new frmAddData();
            ModuleHandler.Host.showForm(f);
            return true;
        }
        [CommandAttibute("ViewData")]
        public static bool ViewData()
        {
            frmDataLists f = new frmDataLists();
            ModuleHandler.Host.showForm(f);
            return true;
        }
        [CommandAttibute("FillDayDatasList")]
        public static List<BaseDayData> FillDayDatasList()
        {
            DayDatasService _cs = new DayDatasService();
            return _cs.GetProductsDataTable();
        }

        [CommandAttibute("GetDayDatas")]
        public static double GetDayDatas(string id_)
        {
            DayDatasService _cs = new DayDatasService();
            return _cs.GetProductsPrice(id_);
        }

    }
}
